package com.wxzz.elearing.course.entity;

import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wxzz.elearning.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 课程章节
 * </p>
 *
 * @author
 * @since 2021-03-10
 */
@Data
@ApiModel(value = "CurriculumSection对象", description = "课程章节")
public class CurriculumSection extends BaseEntity {

    @NotNull(message = "请传入课程id")
    @ApiModelProperty(value = "课程id")
    private Long curriculumId;

    @ApiModelProperty(value = "章节名称")
    private String sectionName;

    @NotNull(message = "请传入单元id")
    @ApiModelProperty(value = "单元id")
    private Long curriculumUnitId;

    @ApiModelProperty(value = "是否限免 0-否 1-是")
    private Integer isFee;

    @ApiModelProperty(value = "课程视频url")
    private String videoUrl;

    @ApiModelProperty(value = "题目数量")
    private Long topicNum;

    @ApiModelProperty(value = "视频时长(时间戳)")
    private Long videoTime;

    @NotNull(message = "请传入合格标准")
    @ApiModelProperty(value = "合格标准 大于等于几分")
    private BigDecimal qualified;

    @ApiModelProperty(value = "排序 从小到大")
    private Long curriculumSectionSort;

    @TableField(exist = false)
    @ApiModelProperty(value = "单元名称")
    private String unitName;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否通过 0-未通过 1-通过 2-无法考试")
    private Integer isPass = 2;


    @TableField(exist = false)
    @ApiModelProperty(value = "课程章节测评试题")
    private List<CurriculumSectionTopic> curriculumSectionTopics;

}
